﻿using Cap;

namespace Microsoft.Extensions.DependencyInjection
{
    public static class CapBuilderExtensions
    {
        public static ICapBuilder AddEventSource<TEventSource>(this ICapBuilder builder, string name, Action<IEndpointBuilder> endpoints)
            where TEventSource : IEventSource, new()
        {
            builder.AddEventSource<TEventSource>(name, configure =>
            {

            });
            return builder;
        }

        public static ICapBuilder AddCapStrategy<TCapStrategy>(this ICapBuilder builder)
           where TCapStrategy : ICapStrategy, new()
        {
            builder.AddCapStrategy(configure =>
            {
                return new TCapStrategy();
            });
            return builder;
        }
    }
}
